home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2257 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Indexed addressing mode on MIPS R8000
  5. Date: Sat, 20 Jan 96 01:21:22 GMT
  6. Organization: none
  7. Message-ID: <822100882snz@genesis.demon.co.uk>
  8. References: <4dohb1$ccr@elna.ethz.ch>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4dohb1$ccr@elna.ethz.ch> chagmann "Christian Hagmann" writes:
  15.  
  16. >I use some Base-pointers and some Offset-pointers in C. I think, the Compiler
  17. >should translate an expression like 'a0=*(b0+off0);' as an indexed addressing
  18. >mode 'LDXC1 $fx,$y,$z'. Sometimes it is translated in this way, but sometimes
  19. >it is translated in the way, that b0 and off0 become added (Integer-Operation)
  20. >and loaded in the Offset addressing mode 'LDC1 $fx,0($q)' with $q=$y+$z. This
  21. >disturbs the flow of the programm and makes it slow.
  22.  
  23. Have you benchmarked it to determine that it is actually slower? Anyway
  24. so long as the output is correct the requirements of the C language are
  25. satisfied. Performance is purely a quality of implementation issue. If you
  26. have a problem with the code quality of a particular compiler you should
  27. take it up with the manufacturer. The place to discuss it on Usenet is
  28. a newsgroup related to the platform in question, maybe in the comp.sys.sgi
  29. hierarchy in this case.
  30.  
  31. >So, my question is:
  32. >
  33. >Are there any restrictions in register-register indexed addressing Mode on the
  34. >MIPS R8000 or does the IRIX restrict this addressing Mode?
  35.  
  36. Your question is extremely system specific and really has nothing to do
  37. with the C language.
  38.  
  39. -- 
  40. -----------------------------------------
  41. Lawrence Kirby | fred@genesis.demon.co.uk
  42. Wilts, England | 70734.126@compuserve.com
  43. -----------------------------------------
  44.